/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.fii.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Zeus
 */
@Entity
@Table(name = "pg_planestudio_detalle", catalog = "prog_acad", schema = "")
@NamedQueries({
    @NamedQuery(name = "PgPlanestudioDetalle.findAll", query = "SELECT p FROM PgPlanestudioDetalle p"),
    @NamedQuery(name = "PgPlanestudioDetalle.findByPgcodPlan", query = "SELECT p FROM PgPlanestudioDetalle p WHERE p.pgPlanestudioDetallePK.pgcodPlan = :pgcodPlan"),
    @NamedQuery(name = "PgPlanestudioDetalle.findByPgcodCurso", query = "SELECT p FROM PgPlanestudioDetalle p WHERE p.pgPlanestudioDetallePK.pgcodCurso = :pgcodCurso"),
    @NamedQuery(name = "PgPlanestudioDetalle.findByPgCiclo", query = "SELECT p FROM PgPlanestudioDetalle p WHERE p.pgCiclo = :pgCiclo"),
    @NamedQuery(name = "PgPlanestudioDetalle.findByPghrTeoria", query = "SELECT p FROM PgPlanestudioDetalle p WHERE p.pghrTeoria = :pghrTeoria"),
    @NamedQuery(name = "PgPlanestudioDetalle.findByPghrPractica", query = "SELECT p FROM PgPlanestudioDetalle p WHERE p.pghrPractica = :pghrPractica"),
    @NamedQuery(name = "PgPlanestudioDetalle.findByPgfechaRegistro", query = "SELECT p FROM PgPlanestudioDetalle p WHERE p.pgfechaRegistro = :pgfechaRegistro"),
    @NamedQuery(name = "PgPlanestudioDetalle.findByPgflagEstado", query = "SELECT p FROM PgPlanestudioDetalle p WHERE p.pgflagEstado = :pgflagEstado")})
public class PgPlanestudioDetalle implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected PgPlanestudioDetallePK pgPlanestudioDetallePK;
    @Basic(optional = false)
    @Column(name = "pg_ciclo", nullable = false, length = 20)
    private String pgCiclo;
    @Basic(optional = false)
    @Column(name = "pg_hr_Teoria", nullable = false)
    private int pghrTeoria;
    @Basic(optional = false)
    @Column(name = "pg_hr_Practica", nullable = false)
    private int pghrPractica;
    @Basic(optional = false)
    @Column(name = "pg_fecha_Registro", nullable = false)
    @Temporal(TemporalType.DATE)
    private Date pgfechaRegistro;
    @Column(name = "pg_flagEstado")
    private Character pgflagEstado;

    public PgPlanestudioDetalle() {
    }

    public PgPlanestudioDetalle(PgPlanestudioDetallePK pgPlanestudioDetallePK) {
        this.pgPlanestudioDetallePK = pgPlanestudioDetallePK;
    }

    public PgPlanestudioDetalle(PgPlanestudioDetallePK pgPlanestudioDetallePK, String pgCiclo, int pghrTeoria, int pghrPractica, Date pgfechaRegistro) {
        this.pgPlanestudioDetallePK = pgPlanestudioDetallePK;
        this.pgCiclo = pgCiclo;
        this.pghrTeoria = pghrTeoria;
        this.pghrPractica = pghrPractica;
        this.pgfechaRegistro = pgfechaRegistro;
    }

    public PgPlanestudioDetalle(String pgcodPlan, String pgcodCurso) {
        this.pgPlanestudioDetallePK = new PgPlanestudioDetallePK(pgcodPlan, pgcodCurso);
    }

    public PgPlanestudioDetallePK getPgPlanestudioDetallePK() {
        return pgPlanestudioDetallePK;
    }

    public void setPgPlanestudioDetallePK(PgPlanestudioDetallePK pgPlanestudioDetallePK) {
        this.pgPlanestudioDetallePK = pgPlanestudioDetallePK;
    }

    public String getPgCiclo() {
        return pgCiclo;
    }

    public void setPgCiclo(String pgCiclo) {
        this.pgCiclo = pgCiclo;
    }

    public int getPghrTeoria() {
        return pghrTeoria;
    }

    public void setPghrTeoria(int pghrTeoria) {
        this.pghrTeoria = pghrTeoria;
    }

    public int getPghrPractica() {
        return pghrPractica;
    }

    public void setPghrPractica(int pghrPractica) {
        this.pghrPractica = pghrPractica;
    }

    public Date getPgfechaRegistro() {
        return pgfechaRegistro;
    }

    public void setPgfechaRegistro(Date pgfechaRegistro) {
        this.pgfechaRegistro = pgfechaRegistro;
    }

    public Character getPgflagEstado() {
        return pgflagEstado;
    }

    public void setPgflagEstado(Character pgflagEstado) {
        this.pgflagEstado = pgflagEstado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pgPlanestudioDetallePK != null ? pgPlanestudioDetallePK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PgPlanestudioDetalle)) {
            return false;
        }
        PgPlanestudioDetalle other = (PgPlanestudioDetalle) object;
        if ((this.pgPlanestudioDetallePK == null && other.pgPlanestudioDetallePK != null) || (this.pgPlanestudioDetallePK != null && !this.pgPlanestudioDetallePK.equals(other.pgPlanestudioDetallePK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.fii.entity.PgPlanestudioDetalle[ pgPlanestudioDetallePK=" + pgPlanestudioDetallePK + " ]";
    }
    
}
